/* eBookrController */

#import <Cocoa/Cocoa.h>
#import "eBookr_Prefix.pch"
#import "eBookrPrefs.h"
#import "GutenMarkController.h"
#import "MobileDeviceController.h"
#import "TextSplitter.h"

@interface eBookrController : NSObject
{
	IBOutlet NSButton *convertButton;
    IBOutlet NSTextField *gutenbergTextPath;
	IBOutlet NSButton *openHTMLCheckBox;
	IBOutlet NSButton *moveToTrashCheckBox;
	IBOutlet NSPopUpButton *splitTypeMenu;
    IBOutlet NSTextField *splitterPath;
	IBOutlet eBookrPrefs *prefs;
	IBOutlet NSWindow *mainWin;
	IBOutlet NSPanel *progressPanel;
	IBOutlet NSTextField *progressPanelText;
	IBOutlet NSProgressIndicator *progressPanelIndicator;
	IBOutlet NSTextField *iphoneStatusText;
	IBOutlet NSProgressIndicator *copyToPhoneProgressIndicator;
	IBOutlet NSProgressIndicator *copyFromPhoneProgressIndicator;
	IBOutlet NSButton *copyFromPhoneButton;
	IBOutlet NSButton *sendToPhoneButton;
	IBOutlet NSButton *addFilesToTableButton;
	IBOutlet NSButton *removeSelectedFilesFromTableButton;
    IBOutlet NSTableView *filesTable;
    IBOutlet NSTableView *iphoneTable;
	
	NSMutableArray *filesInTable;
	NSMutableArray *filesOnPhone;
	GutenMarkController *gutenMarker;
	MobileDeviceController *iphoneController;
	int iphoneStatus;
}

enum {
	iPhoneUnattached,
	iPhoneAttached,
	requestingDirectoryContents,
	recursingIntoSubdirectory
};

- (void)defaultBookFolderDidChange:(NSNotification *)aNotification;
- (IBAction)chooseTextFile:(id)sender;
- (IBAction)copyAllBooksFromPhone:(id)sender;
- (void)doGutenMarkForNotification:(NSNotification *)aNotification;
- (IBAction)doConvert:(id)sender;
- (IBAction)doSplit:(id)sender;
- (IBAction)sendBooksToPhone:(id)sender;
- (IBAction)addFilesToFilesTable:(id)sender;
- (IBAction)removeSelectedFilesFromFilesTable:(id)sender;
@end
